Find the Maximum Length of Valid Subsequence I